import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/', 
      name: 'home',
      component: () => import('../views/Homeview.vue')
    },
    {
      path: '/weather',
      name: 'weather',
      component: () => import('../views/Weatherview.vue')
    },
    {
      path: '/add',
      name: 'add',
      component: () => import('../views/Addview.vue')
    },
    {
      path: '/watch/:city?',
      name: 'watch',
      component: () => import('../views/Watchview.vue')
    }
  ],
})

export default router
